const Router = require('koa-router');
const path = require('path');
const fs = require("fs");

const router = new Router();

// 区分开发环境和生产环境下的根目录
const RootDirectory = process.env.NODE_ENV === "dev" ? path.resolve(__dirname, "../") : __dirname;


/**
 * @description: 穿件路由请求
 * @author: 王琛
 * @Date: 2025-09-03 14:37:54
 * @param {*}
 * @return {*}
 */

router.get('/', async (ctx) => {
    const MainFn = async () => {
        ctx._UeSocket.send(JSON.stringify({
            "Key":"Value"
        }));
        ctx.success();
    }

    await ctx.UnifiedErr(MainFn, ctx.fail)
});

module.exports = router;
